package com.statonline.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.statonline.domain.Persona;
import com.statonline.repository.PersonaDao;

@Component
public class SimplePersonaManager implements PersonaManager {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Autowired
    private PersonaDao contactDao;

	public void setContactDao(PersonaDao contactDao) {
		this.contactDao = contactDao;
	}

	public void addContact(Persona contact) {
		// TODO Auto-generated method stub
		contactDao.saveContact(contact);
	}

	public List<Persona> getContacts() {
		// TODO Auto-generated method stub
		//return null;
		return contactDao.getContactList();
	}

}
